package Test;

import java.io.IOException;
import java.nio.CharBuffer;

/*class PrintTask implements Runnable{

	@Override
	public void run() {
		for(int i=0;i<10;i++)
			System.out.println(i);
		
	}
	
}*/
public class Main {
    public static void main(String[] args) throws InterruptedException {
        /*Thread t1 = new Thread(new PrintTask());
        System.out.println(Thread.currentThread().getName() + " end");
       t1.setDaemon(true);
        t1.start();*/
    	
    	
    	
    	  Thread t1 = new Thread(new PrintTask());
    	  t1.join();
          t1.start();
    	 
    	          System.out.println(Thread.currentThread().getName()+" end");
    	
    	
    	
    }
}
